/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#ifndef LIB2D_HARD_IMAGE_H
#define LIB2D_HARD_IMAGE_H

#include <lib2d/math.h>
#include <pictureformat/pictureformat.h>

namespace liba
{
namespace lib2d
{
namespace hard
{

class Image
{
public:
	virtual ~Image()
	{}

	virtual bool is_valid()const=0;

	virtual void blit( const Vector2 & dst, const Rect & rect, int alpha = 255 )=0;
	virtual void blit( const Vector2 & dst, int alpha = 255 )=0;

	virtual void fill_rect( const Rect & dst_rect, int alpha = 255 )=0;
	virtual void fill_rect( const Rect & dst_rect, const Rect & src_rect, int alpha = 255 )=0;

	virtual pictureformat::Format get_format()const=0;

	virtual void * lock( int * stride )=0;
	virtual void unlock()=0;

	virtual int get_width()const = 0;
	virtual int get_height()const = 0;
};

} //namespace hard
} //namespace lib2d
} //namespace liba

using namespace liba;

#endif //LIB2D_HARD_IMAGE_H

